/*
package com.lantu.wisdom.common.utils;

import com.alibaba.fastjson.JSONObject;
import lombok.extern.slf4j.Slf4j;

*/
/**
 * @Description:
 * @Author: duhui
 * @Date: 2020/8/14 14:29
 *//*

@Slf4j
public class AccessTokenUtil {
    public static String appid = "wx60895131fec9764dv";
    public static String secret = "9ed0d7be0d43fc2a30c313a254a673bf";
    public static String url="https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=%s&secret=%s";


    public static String getAccessToken(){
        String httpString=HttpUtil.get(String.format(url,appid,secret),null,null);
        JSONObject jsonObject= JSONObject.parseObject(httpString);
        String access_token=null;
        Integer errcode=(Integer)jsonObject.get("errcode");
        if(null == errcode ||errcode.equals("0")){
            access_token=(String) jsonObject.get("access_token");
        }else {
            log.error(LogUtil.CONTENT,"获取access_token错误 msg:"+jsonObject.get("errmsg"));
        }
        return access_token;
    }
}
*/
